const extname = (filename) => {
  /* TODO */
  let lastIndex = filename.lastIndexOf('.')
  if (lastIndex < 1) { // 这里认为.html是没有扩展名的
    return ''
  }
  return filename.substring(lastIndex)
}
console.log(extname(''))
console.log(extname('.html'))
console.log(extname("wang.he.dsdf.html"))
